package com.hongshan.wallet.base

import android.databinding.Observable

/**
 * Copyright Zhangxx.
 * Copyright (c) 2019
 * All rights reserved
 *
 * @project  : Wallet
 * @package  : com.example.wallet.base
 * @author   : zhangxx
 * @data     : 2019/3/21
 * @email    : qq957413212@hotmail.com
 */
class BaseOnPropertyChangedCallback<T:Observable> (val block:(T,Int)->Unit): Observable.OnPropertyChangedCallback() {
    @Suppress("UNCHECKED_CAST")
    override fun onPropertyChanged(sender: Observable, propertyId: Int) {
        block(sender as T, propertyId)
    }
}